using System.ComponentModel.DataAnnotations;
 using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class E1SchoolsMap : EntityTypeConfiguration<E1Schools>
    {
        public E1SchoolsMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Country)
                .HasMaxLength(50);

            this.Property(t => t.SchoolName)
                .HasMaxLength(50);

            this.Property(t => t.SiteVersion)
                .HasMaxLength(20);

            this.Property(t => t.EtownCityCode)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("E1Schools");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Country).HasColumnName("Country");
            this.Property(t => t.SchoolName).HasColumnName("SchoolName");
            this.Property(t => t.CityBlurb).HasColumnName("CityBlurb");
            this.Property(t => t.SchoolBlurb).HasColumnName("SchoolBlurb");
            this.Property(t => t.MoreSchoolsCity).HasColumnName("MoreSchoolsCity");
            this.Property(t => t.SiteVersion).HasColumnName("SiteVersion");
            this.Property(t => t.EtownCityCode).HasColumnName("EtownCityCode");
            this.Property(t => t.type).HasColumnName("type");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
            this.Property(t => t.status).HasColumnName("status");
            this.Property(t => t.IsSentToSF).HasColumnName("IsSentToSF");
        }
    }
}
